package com.zcl.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student implements Serializable {
    @Id     //表示以下的字段为主键
    private Integer sid;
    private String sname;
    private Integer cid;
    private Integer age;
    private String sex;
    private String addr;
    //声明以下字段不在同一张表中
    @Transient
    private String cname;


}
